package nzk.hssftemp;

import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.ss.usermodel.Font;

/**
 * Cell style for detail's footer (totals), formatted as number.
 *
 * @author N. Zulkarnaen (n.zulkarnaen@gmail.com)
 *         Date: 6/27/13
 *         Time: 6:13 PM
 * @version $Revision: 5 $
 */
public class CSDetailFooter extends CSBase {

    public CSDetailFooter(HSSFTemplate rpt) {
        super(rpt);
        font.setFontHeightInPoints((short) 10);
        font.setBoldweight(Font.BOLDWEIGHT_BOLD);
        font.setColor(Color.BLACK);
        //
        style.setDataFormat(rpt.format.getFormat("#,##0.00"));
        style.setWrapText(false);
        style.setAlignment(HSSFCellStyle.ALIGN_RIGHT);
        style.setFillForegroundColor(Color.GREY);
        style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
        style.setBorderTop(HSSFCellStyle.BORDER_THIN);
        style.setBorderRight(HSSFCellStyle.BORDER_THIN);
        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
    }

}
